﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ForExam
{
    public class DataStructs
    {
    }

    //题目类型
    [Flags]
    enum TopicType
    {
        Singlechoice,    //单选
        Multichoice,    //多选
        Judge           //判断 
    }

    //题目基类
    class Topic
    {
        //唯一标识
        public string Identifies { get; set; } 
        //题目类型
        public TopicType Type{ get; set; }
        //题干
        public string Content { get; set; }
        //选项
        public List<Candidate> CandidateItems { get; set; }
        //结果
        public string Result { get; set; }
        //详细分析
        public string Detaile { get; set; }
        //图片
        public string Picture { get; set; }
        //知识点分类
        public string ContentType { get; set; }
        //统计信息
        public Statistic Statistics { get; set; }
    }
    //选项
    class Candidate
    {
        //名字  ABCD
        public char Name { get; set; }
        //内容
        public string Content { get; set; }
        //图片
        public string Picture { get; set; }
    }
    //统计信息
    class Statistic
    {
        //难度 0~10
        private int m_Difficulty=0;
        public int MyProperty
        {
            get { return m_Difficulty; }
            set 
            {
                if (m_Difficulty > 10)
                {
                    System.Diagnostics.Debug.Assert(m_Difficulty > 10,"难度大于10");
                    m_Difficulty = 10;
                }
                if (m_Difficulty < 0)
                {
                    System.Diagnostics.Debug.Assert(m_Difficulty < 0, "难度小于0");
                    m_Difficulty = 0;
                }
                m_Difficulty = value; 
            }
        }
        
        //做对的次数
        public int RightCount { get; set; }
        //做错的次数
        public int WrongCount { get; set; }
    }

}
